package com.rds.common.api.material.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.rds.common.annotation.Excel;
import com.rds.common.core.domain.BaseEntity;

import java.util.Date;
import java.util.List;
import java.util.Objects;

/**
 * 材料清单对象 rda_material_bill
 *
 * @author rds
 * @date 2021-08-17
 */
public class MaterialBill extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 名称 */
    @Excel(name = "名称")
    private String name;

    /** 描述 */
    @Excel(name = "描述")
    private String description;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date modifyTime;

    /** 状态 */
    @Excel(name = "状态")
    private Integer status;

    /** code */
    @Excel(name = "code")
    private String code;

    /** 数量 */
    @Excel(name = "number")
    private Double number;

    /** 测量单位 */
    @Excel(name = "units")
    private String units;


    /** revision */
    @Excel(name = "revision")
    private String revision;

    /** rank */
    @Excel(name = "rank")
    private String rank;

    /** level */
    @Excel(name = "level")
    private Integer level;

    /** parentid */
    @Excel(name = "parentid")
    private Long parentid;

    /** material id */
    @Excel(name = "materialid")
    private Long materialid;

    /** owner id */
    @Excel(name = "ownerid")
    private Integer ownerid;

    public String getNametype() {
        return nametype;
    }

    public void setNametype(String nametype) {
        this.nametype = nametype;
    }

    /** 顺序号 */
    @Excel(name = "顺序号")
    private Integer rdorder;

    /** 类型id */
    @Excel(name = "类型id")
    private Integer typeid;

    /** 策略id */
    @Excel(name = "策略id")
    private Integer policyid;

    /** 状态id */
    @Excel(name = "状态id")
    private Integer stateid;

    private Long projectid;

    /** 临时存储原来的id */
    private Long tmpid;
    private Long tmptime;
    /** 临时上级ID */
    private Long tmpParentid;
    /** 临时上级层级 */
    private Integer tmpLevel;

    /** 临时姓名 */
    private String tmpName;
    /** 临时版本 */
    private String tmpRevision;
    /** 临时上级层级 */
    private Double tmpNumber;

    /** 临时名称类型 */
    private String nametype;

    /** 关系id */
    private String relId;

    private Integer levels;

    private List<RdaPartsRel> RdaPartsRel;

    public List<RdaPartsRel> getRdaPartsRel() {
        return RdaPartsRel;
    }

    public void setRdaPartsRel(List<RdaPartsRel> rdaPartsRel) {
        RdaPartsRel = rdaPartsRel;
    }

    public Integer getLevels() {
        return levels;
    }

    public void setLevels(Integer levels) {
        this.levels = levels;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setDescription(String description)
    {
        this.description = description;
    }

    public String getDescription()
    {
        return description;
    }
    public void setModifyTime(Date modifyTime)
    {
        this.modifyTime = modifyTime;
    }

    public Date getModifyTime()
    {
        return modifyTime;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }
    public void setCode(String code)
    {
        this.code = code;
    }

    public String getCode()
    {
        return code;
    }
    public void setRevision(String revision)
    {
        this.revision = revision;
    }

    public void setRank(String rank)
    {
        this.rank = rank;
    }

    public String getRank()
    {
        return rank;
    }
    public void setLevel(Integer level)
    {
        this.level = level;
    }

    public Integer getLevel()
    {
        return level;
    }

    public void setOwnerid(Integer ownerid)
    {
        this.ownerid = ownerid;
    }

    public Integer getOwnerid()
    {
        return ownerid;
    }

    public void setRdorder(Integer rdorder)
    {
        this.rdorder = rdorder;
    }

    public Integer getRdorder()
    {
        return rdorder;
    }
    public void setTypeid(Integer typeid)
    {
        this.typeid = typeid;
    }

    public Integer getTypeid()
    {
        return typeid;
    }
    public void setPolicyid(Integer policyid)
    {
        this.policyid = policyid;
    }

    public Integer getPolicyid()
    {
        return policyid;
    }
    public void setStateid(Integer stateid)
    {
        this.stateid = stateid;
    }

    public Integer getStateid()
    {
        return stateid;
    }

    public String getRevision() {
        return revision;
    }

    public Long getParentid() {
        return parentid;
    }

    public void setParentid(Long parentid) {
        this.parentid = parentid;
    }

    public Long getMaterialid() {
        return materialid;
    }

    public void setMaterialid(Long materialid) {
        this.materialid = materialid;
    }

    public Double getNumber() {
        return number;
    }

    public void setNumber(Double number) {
        this.number = number;
    }

    public String getUnits() {
        return units;
    }

    public void setUnits(String units) {
        this.units = units;
    }

    public Long getProjectid() {
        return projectid;
    }

    public void setProjectid(Long projectid) {
        this.projectid = projectid;
    }

    public Long getTmpid() {
        return tmpid;
    }

    public void setTmpid(Long tmpid) {
        this.tmpid = tmpid;
    }

    public Long getTmptime() {
        return tmptime;
    }

    public void setTmptime(Long tmptime) {
        this.tmptime = tmptime;
    }

    public Long getTmpParentid() {
        return tmpParentid;
    }

    public Integer getTmpLevel() {
        return tmpLevel;
    }

    public void setTmpLevel(Integer tmpLevel) {
        this.tmpLevel = tmpLevel;
    }

    public void setTmpParentid(Long tmpParentid) {
        this.tmpParentid = tmpParentid;
    }

    public String getTmpName() {
        return tmpName;
    }

    public void setTmpName(String tmpName) {
        this.tmpName = tmpName;
    }

    public String getTmpRevision() {
        return tmpRevision;
    }

    public void setTmpRevision(String tmpRevision) {
        this.tmpRevision = tmpRevision;
    }

    public Double getTmpNumber() {
        return tmpNumber;
    }

    public void setTmpNumber(Double tmpNumber) {
        this.tmpNumber = tmpNumber;
    }

    public String getRelId() {
        return relId;
    }

    public void setRelId(String relId) {
        this.relId = relId;
    }

    @Override
    public String toString() {
        return "MaterialBill{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", description='" + description + '\'' +
                ", modifyTime=" + modifyTime +
                ", status=" + status +
                ", code='" + code + '\'' +
                ", number=" + number +
                ", units='" + units + '\'' +
                ", revision='" + revision + '\'' +
                ", rank='" + rank + '\'' +
                ", level=" + level +
                ", parentid=" + parentid +
                ", materialid=" + materialid +
                ", ownerid=" + ownerid +
                ", rdorder=" + rdorder +
                ", typeid=" + typeid +
                ", policyid=" + policyid +
                ", stateid=" + stateid +
                ", projectid=" + projectid +
                ", tmpid=" + tmpid +
                ", tmptime=" + tmptime +
                ", tmpParentid=" + tmpParentid +
                ", tmpLevel=" + tmpLevel +
                ", tmpName='" + tmpName + '\'' +
                ", tmpRevision='" + tmpRevision + '\'' +
                ", tmpNumber=" + tmpNumber +
                ", nametype='" + nametype + '\'' +
                ", relId='" + relId + '\'' +
                ", levels=" + levels +
                ", RdaPartsRel=" + RdaPartsRel +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MaterialBill that = (MaterialBill) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(name, that.name) &&
                Objects.equals(description, that.description) &&
                Objects.equals(modifyTime, that.modifyTime) &&
                Objects.equals(status, that.status) &&
                Objects.equals(code, that.code) &&
                Objects.equals(number, that.number) &&
                Objects.equals(units, that.units) &&
                Objects.equals(revision, that.revision) &&
                Objects.equals(rank, that.rank) &&
                Objects.equals(level, that.level) &&
                Objects.equals(parentid, that.parentid) &&
                Objects.equals(materialid, that.materialid) &&
                Objects.equals(ownerid, that.ownerid) &&
                Objects.equals(rdorder, that.rdorder) &&
                Objects.equals(typeid, that.typeid) &&
                Objects.equals(policyid, that.policyid) &&
                Objects.equals(stateid, that.stateid) &&
                Objects.equals(projectid, that.projectid) &&
                Objects.equals(tmpid, that.tmpid) &&
                Objects.equals(tmptime, that.tmptime) &&
                Objects.equals(tmpParentid, that.tmpParentid) &&
                Objects.equals(tmpLevel, that.tmpLevel);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, description, modifyTime, status, code, number, units, revision, rank, level, parentid, materialid, ownerid, rdorder, typeid, policyid, stateid, projectid, tmpid, tmptime, tmpParentid, tmpLevel);
    }
}
